var CQueue = function() {
    this.queue=[];
    this.otherqueue=[];
};

/** 
 * @param {number} value
 * @return {void}
 */
CQueue.prototype.appendTail = function(value) {
    this.queue.push(value);
};

/**
 * @return {number}
 */
CQueue.prototype.deleteHead = function() {
    if(!this.queue.length){
        return -1;
    }
    while(this.queue.length){
        this.otherqueue.push(this.queue.pop())
    }
    let res=this.otherqueue.pop();
    while(this.otherqueue.length){
        this.queue.push(this.otherqueue.pop())
    }
    this.otherqueue=[]
    return res;
};

/**
 * Your CQueue object will be instantiated and called as such:
 * var obj = new CQueue()
 * obj.appendTail(value)
 * var param_2 = obj.deleteHead()
 */